<template>
  <div>
    <h1>
      <van-nav-bar
        title="职业体验"
        left-text=""
        left-arrow
        @click-left="fun()"
      />
    </h1>
    <div class="top">
      职业体验
      <span><img src="qiqi/职业体验1_03.png" alt="" /></span>
    </div>
    <div class="tuwen">
      <div class="tutu">
        <b style="margin-bottom: 10px">热门精选</b>
        <p v-for="v in this.$store.state.qiqi.arr7" :key="v.id">
          <img @click="add(v)" :src="v.img" alt="" /><br />
          {{ v.job }}
        </p>
      </div>
      <div class="tutu">
        <b style="margin-bottom: 10px">最新上线</b>
        <p v-for="v in this.$store.state.qiqi.arr8" :key="v.id">
          <img :src="v.img" alt="" /><br />
          {{ v.job }}
        </p>
      </div>
      <div class="tutu">
        <b style="margin-bottom: 10px">最受喜欢</b>
        <p v-for="v in this.$store.state.qiqi.arr7" :key="v.id">
          <img :src="v.img" alt="" /><br />
          {{ v.job }}
        </p>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  methods: {
    fun() {
      this.$router.push("/baike");
    },
    add(v) {
      this.$router.push({
        name: "zhiyeyx",
        params: { zhiyeyx: v },
      });
    },
  },
  mounted() {
    this.$store.dispatch("TUTU2");
    this.$store.dispatch("TUTU3");
    console.log(this.$store.state.qiqi);
  },
};
</script>

<style lang="scss" scoped>
* {
  font-size: 0.16rem;
}
.top {
  height: 0.77rem;
  border-bottom: 0.01rem solid rgb(215, 204, 204);
  padding: 0rem 0.2rem;
  font-size: 0.26rem;
  line-height: 0.77rem;
  img {
    float: right;
    margin-top: 0.21rem;
    width: 1.27rem;
    height: 0.31rem;
    b {
      font-weight: 700;
    }
  }
}
.tuwen {
  height: 3.06rem;
  width: 100%;
  margin-top: 0.1rem;
  .tutu {
    display: flex;
    flex-wrap: wrap;
    text-align: center;
    margin-left: 0.29rem;
    margin-top: 0.3rem;
    p {
      margin-top: 0.31rem;
      font-weight: 700;
      font-size: 0.14rem;
      margin-right: 0.25rem;
    }
    img {
      border-radius: 0.2rem;
    }
  }
  b {
    position: absolute;
    left: 0.28rem;
    font-size: 0.18rem;
    font-weight: 700;
  }
}
</style>